<template>    
  <div class="common-layout">
    <el-container>
      <!-- 页面框架头部分 -->
        <el-header>
          <el-row>
    <el-col :span="8"><div class="grid-content ep-bg-purple" style="color:aliceblue; font-size:100px" > </div></el-col>
    <el-col :span="8"><div class="grid-content ep-bg-purple-light" style="color:aliceblue; font-size:35px">MI舆情管理系统</div></el-col>
    <!-- <el-col :span="8"><div class="grid-content ep-bg-purple" style="color:aliceblue; font-size:20px;">乐动无界，音韵无疆</div></el-col> -->
  </el-row>
        </el-header>
  <!-- 侧边主菜单栏 -->
    <el-container>
      <el-aside width="200px"> 
      <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
      router
      >
      <el-sub-menu index="1" v-if="userPower ==='200'">
        <template #title>
          <el-icon><location /></el-icon>
          <span>审核</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="checkstatistics" v-if="userPower ==='300'">审核统计</el-menu-item>
          <el-menu-item index="checkmanage" v-if="userPower ==='200'">审核管理</el-menu-item>
          <el-menu-item index="feedback" v-if="userPower ==='200'">申诉管理</el-menu-item>

        </el-menu-item-group>
      </el-sub-menu>
      <el-sub-menu index="2" v-if="userPower ==='100'">
        <template #title>
          <el-icon><location /></el-icon>
          
          <span>人员</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="user">用户管理</el-menu-item>
          <el-menu-item index="admin">管理员管理</el-menu-item>
        </el-menu-item-group>
      </el-sub-menu>

      
      
        <el-menu-item-group>
          <el-menu-item index="total">话题概况</el-menu-item>
        </el-menu-item-group>
      
      
        
        <el-menu-item-group>      
          <el-menu-item index="contents">帖子概况</el-menu-item>
        
        </el-menu-item-group>
      
      
        </el-menu>

  </el-aside>

      
        <el-main><router-view></router-view></el-main>
      </el-container>
    </el-container>
  </div>

</template>

<script>
export default {
    data(){
        return{
            routerList:[],
            userPower:localStorage.getItem("userPower")

        }
    },
    mounted(){
       this.routerList= this.$router.getRoutes()
       this.routerList=this.routerList.filter(item=>item.meta.power==this.userPower)
       console.log(this.routerList)
    }

}
</script>

<style scoped>
.el-header{
    background-color:rgb(5, 3, 3);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}

.box-card {
  width: 480px;
}
.box{
  position: relative;
   left: 30px;
}

</style>